//
//  DataShare.m
//  NewMusic
//
//  Created by dllo on 15/11/20.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "DataShare.h"
#import "PlayerViewController.h"
@implementation DataShare
- (void)dealloc{
    [_timer release];
    [super dealloc];
}
+ (DataShare *)shareHandle
{
    static DataShare *handle = nil;
    static dispatch_once_t once;
    dispatch_once(&once, ^{
        if (nil == handle)
        {
            handle = [DataShare new];
        }
    });
    return handle;
}
- (void)HaveTimer:(NSInteger)num
{
    self.timer = [NSTimer scheduledTimerWithTimeInterval:num target:self selector:@selector(change) userInfo:nil repeats:NO];
}
- (void)change
{
    [[PlayerViewController sharePlayerViewController] stopMusic];
}
- (void)removeTime
{
    [self.timer invalidate];
    self.timer = nil;
}
@end
